﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using ARR.Entities;
using ARR.Services.Domain;
using DDF.Entity;

namespace ARR.Services
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "SpacesService" in both code and config file together.
    public class SpacesService : ISpacesService
    {
        public List<Space> GetAllSpaces(int rangeReviewId, bool lazyLoad)
        {
            return SpacesDomain.GetAllSpaces(rangeReviewId, lazyLoad);
        }

        public Space GetSpaceById(int spaceId)
        {
            return SpacesDomain.GetSpaceById(spaceId);
        }

        public void SaveSpaces(List<Space> spaces)
        {
            SpacesDomain.SaveSpaces(spaces);
        }

        public List<Planogram> GetAllPlanograms(int rangeReviewId, bool lazyLoad)
        {
            return SpacesDomain.GetAllPlanograms(rangeReviewId, lazyLoad);
        }

        public Planogram GetPlanogramById(int planogramId)
        {
            return SpacesDomain.GetPlanogramById(planogramId);
        }

        public void SavePlanograms(List<Planogram> planograms)
        {
            SpacesDomain.SavePlanograms(planograms);
        }
        
        public List<TempSpace> GetAllTempSpaces(bool lazyLoad)
        {
            return SpacesDomain.GetAllTempSpaces(lazyLoad);
        }

        public void SaveTempSpaces(List<TempSpace> spaces)
        {
            SpacesDomain.SaveTempSpaces(spaces);
        }

        public List<TempSpace> GetTempSpacesByIds(IEnumerable<int> listIds)
        {
            return SpacesDomain.GetTempSpacesByIds(listIds);
        }
        
        public List<PlanogramLocation> GetAllPlanogramLocations()
        {
            return SpacesDomain.GetAllPlanogramLocations();
        }

        public byte[] GenerateFloorPlan(int rangeReviewId)
        {
            return SpacesDomain.GenerateFloorPlan(rangeReviewId);
        }
    }
}
